using System;
using System.Collections;

using Pdb.Model;
using System.Xml.Serialization;

namespace Pdb.Model
{
	[Serializable]
	public class FileCollection : CollectionBase
	{

		public int Add(File value)
		{
			return base.List.Add(value as object);
		}

		public void Remove(File value)
		{
			base.List.Remove( (object)value);
		}

		public void Insert(int index, File value)
		{
			base.List.Insert(index, (object)value);
		}

		public bool Contains(File value)
		{
			return base.List.Contains( (object)value);
		}

		public File this[int index]
		{
			get { return ( (File)base.List[index]); }
		}

		public File GetFileByName(string name)
		{
			foreach(File file in base.List)
				if(file.Name == name)
					return file;
			return null;
		}

		public bool ContainsFile(string name)
		{
			foreach(File file in base.List)
				if(file.Name == name)
					return true;
			return false;
		}
	}
}
